import
request
from '@/utils/request.js'
export default {

	// 起始数据
	banner(data) {
		return request({
			url: "/setup",
			method: "get",
			data
		})
	},
	// 门店列表
	StoreList(data) {
		return request({
			url: `/shops?q=${data}`,
			method: "get",
			data
		})
	},
	// 首页数据
	Home(data) {
		return request({
			url: `/home`,
			method: "get",
			data
		})
	},
	// 登录
	Login(data) {
		return request({
			url: `/auth/login`,
			method: "post",
			data
		})
	},
	// 绑定手机号
	LoginPhone(data) {
		return request({
			url: `/user/bind_phone`,
			method: "post",
			data
		})
	},
	// 用户数据
	Profile(data) {
		return request({
			url: `/user/profile`,
			method: "get",
			data
		})
	},
	// 修改用户数据
	ProfilePost(data) {
		return request({
			url: `/user/profile`,
			method: "post",
			data
		})
	},
	// 分类列表
	Categories(data) {
		return request({
			url: `/book_club/evaluation/categories`,
			method: "get",
			data
		})
	},
	// 品测列表
	Subjects(data) {
		return request({
			url: `/book_club/evaluation/subjects?page=${data.page}&a_category_id=${data.a_category_id}&b_category_id=${data.b_category_id}`,
			method: "get",
			data
		})
	},
	// 这个是题目列表
	Questions(data) {
		return request({
			url: `/book_club/evaluation/${data.id}/questions`,
			method: "get",
			data
		})
	},
	// 提交题目列表
	SubmitTi(data, id) {
		return request({
			url: `/book_club/evaluation/${id}/submit`,
			method: "post",
			data
		})
	},
	// 平台公告
	Platform(data) {
		return request({
			url: `/notices?page=${data}`,
			method: "get",
			data
		})
	},
	// 门店公告
	Store(data) {
		return request({
			url: `/shop/notices?page=${data}`,
			method: "get",
			data
		})
	},
	// 活动详情
	EventDetails(data) {
		return request({
			url: `/shop/activities/${data}`,
			method: "get",
			data
		})
	},
	// 确认参与/shop/activities/:id/join
	ConfirmParticipation(data) {
		return request({
			url: `/shop/activities/${data}/join`,
			method: "post",
			data
		})
	},
	// 确认参与
	ParentClass(data) {
		return request({
			url: `/classrooms/${data}`,
			method: "get",
			data
		})
	},
	// 选书列表
	SelectionList(data) {
		return request({
			url: `/books?page=${data.page}&q=${data.q}&category_id=${data.category_id}&age_limit_id=${data.age_limit_id}`,
			method: "get",
			data
		})
	},
	// 书籍分类
	BookClassification(data) {
		return request({
			url: `/categories`,
			method: "get",
			data
		})
	},
	// 书籍详情
	BookDetails(data) {
		return request({
			url: `/books/${data}`,
			method: "get",
			data
		})
	},
	// 评论列表
	CommentList(data) {
		return request({
			url: `/books/${data.id}/comments?page=${data.page}`,
			method: "get",
			data
		})
	},
	// =======================================================================================================================================================评论
	CommentsReview(data, id) {
		return request({
			url: `/books/${id}/comments`,
			method: "post",
			data
		})
	},
	// 回复评论
	ReplyReview(data, id) {
		return request({
			url: `/books/${id}/replies`,
			method: "post",
			data
		})
	},
	// 我要借阅
	LikeToBorrow(data, id) {
		return request({
			url: `/books/${id}/borrow`,
			method: "post",
			data
		})
	},
	// 阅读通关列表
	BooksList(data) {
		return request({
			url: `/book_club/examination/books?page=${data.page}&q=${data.value}`,
			method: "get",
			data
		})
	},
	// 积分签到
	Clock_in(data) {
		return request({
			url: `/user/clock_in`,
			method: "post",
			data
		})
	},
	// 积分列表
	Scores(data) {
		return request({
			url: `/user/scores`,
			method: "get",
			data
		})
	},
	// 关卡列表
	ExaminationBook(data) {
		return request({
			url: `/book_club/examination/books/${data.id}/levels`,
			method: "get"
		})
	},

	// 提交关卡
	SubmitLevel(data, book_id, level_id) {
		return request({
			url: `/book_club/examination/books/${book_id}/levels/${level_id}`,
			method: "post",
			data
		})
	},
	// 通关记录
	Examinations(data) {
		return request({
			url: `/user/examinations?page=${data.page}`,
			method: "get"
		})
	},
	// 启动数据
	Setup(data) {
		return request({
			url: `/setup`,
			method: "get"
		})
	},
	// 借阅书籍列表
	Borrows(data) {
		return request({
			url: `/bookshelf/borrows?page=${data.page}&status=${data.status}&q=${data.q}`,
			method: "get"
		})
	},
	// 删除借阅记录
	BorrowsDetils(data) {
		return request({
			url: `/bookshelf/borrows/${data.id}`,
			method: "delete"
		})
	},
	// 续借记录
	BorrowsRenewal(data) {
		return request({
			url: `/bookshelf/borrows/${data.id}/renewal`,
			method: "post"
		})
	},
	// 借阅
	BorrowsJie(data) {
		return request({
			url: `/bookshelf/borrows`,
			method: "post",
			data
		})
	},
	// 借阅详情
	BorrowsConfirm(data) {
		return request({
			url: `/bookshelf/borrows/${data.book_no}/confirm`,
			method: "get"
		})
	},
	// 分享二维码
	Qrcode(data) {
		return request({
			url: `/user/qrcode`,
			method: "get"
		})
	},
	// 分享二维码
	Activities(data) {
		return request({
			url: `/user/activities?page=${data.page}&type=${data.type}`,
			method: "get"
		})
	},
	// 这个是月度报告
	Report(data) {
		return request({
			url: `/user/report?type=${data.month}&date=${data.type}`,
			method: "get"
		})
	},
	// 这个是阅读排行
	Rankings(data) {
		return request({
			url: `/user/rankings?order_by=${data.book_club}`,
			method: "get"
		})
	},
	// 这个是读书会核销记录
	Book_club_offsets(data) {
		return request({
			url: `/user/book_club_offsets?page=${data.page}`,
			method: "get"
		})
	},
	// 这个是申请会员
	Subscribes(data) {
		return request({
			url: `/user/vip/subscribes`,
			method: "post",
			data
		})
	},
	// 会员申请记录
	SubscribesPage(data) {
		return request({
			url: `/user/vip/subscribes?page=${data.page}`,
			method: "get"
		})
	},
	// 会员升级记录
	Upgrades(data) {
		return request({
			url: `/user/vip/upgrades?page=${data.page}`,
			method: "get"
		})
	},
	// 会员升级
	UpgradesSheng(data) {
		return request({
			url: `/user/vip/upgrades`,
			method: "post"
		})
	},
	// 会员续费
	Renewals(data) {
		return request({
			url: `/user/vip/renewals`,
			method: "post",
			data
		})
	},
	// 会员续费记录
	RenewalsList(data) {
		return request({
			url: `/user/vip/renewals?page=${data.page}`,
			method: "get"
		})
	},
	// 扫码核销
	Scan(data) {
		return request({
			url: `/shop/admin/scan`,
			method: "post",
			data
		})
	},
	// 确认核销
	Offset(data) {
		return request({
			url: `/shop/admin/offset`,
			method: "post",
			data
		})
	},
	// 借阅列表
	borrowsList(data) {
		return request({
			url: `/shop/admin/borrows?page=${this.page}&status=${data.status}&date=${data.date}`,
			method: "get"
		})
	},
	// 阅读通关记录
	ExaminationsRecord(data) {
		return request({
			url: `/shop/admin/examinations?page=${data.page}&direction=${data.direction}&q=${data.q}`,
			method: "get"
		})
	},
	// 这个是填写评语
	ExaminationsLevels(data, examination_id, level_id) {
		return request({
			url: `/shop/admin/examinations/${examination_id}/levels/${level_id}/comment`,
			method: "post",
			data
		})
	},
	// 读书会会员列表
	vipsList(data) {
		return request({
			url: `/shop/admin/vips?page=${data.page}&direction=${data.direction}&q=${data.q}`,
			method: "get"
		})
	},
	// 创建读书会核销
	book_club_offsets(data) {
		return request({
			url: `/shop/admin/vips/${data.id}/book_club_offsets`,
			method: "get"
		})
	},
	// 创建读书会核销
	book_club_offsetsss(data, id) {
		return request({
			url: `/shop/admin/vips/${id}/book_club_offsets`,
			method: "post",
			data
		})
	},
	// 门店书籍统计
	stat(data) {
		return request({
			url: `/shop/admin/stat`,
			method: "get"
		})
	},
	// 借阅统计
	LoanStatistics(data) {
		return request({
			url: `/shop/admin/stat/borrow?date=${data.date}`,
			method: "get"
		})
	},
	// 门店书籍管理
	StoreBooks(data) {
		return request({
			url: `/shop/admin/books?page=${data.page}&q=${data.q}`,
			method: "get"
		})
	},
	// 创建书籍
	CreateBooks(data) {
		return request({
			url: `/shop/admin/books`,
			method: "post",
			data
		})
	},
	// isbn码
	Isbn(data) {
		return request({
			url: `/isbn/${data.isbn}`,
			method: "get"
		})
	},
	// 入库
	Storage(data, id) {
		return request({
			url: `/shop/admin/books/${id}/input`,
			method: "post",
			data
		})
	},
	// 意见反馈
	Feedback(data, id) {
		return request({
			url: `/user/feedback`,
			method: "post",
			data
		})
	},
	// 文章详情
	ArticleDetails(data, id) {
		return request({
			url: `/articles/${data.name}`,
			method: "get"
		})
	},
	// 文章详情
	Evaluations(data) {
		return request({
			url: `/user/evaluations?page=${data.page}`,
			method: "get"
		})
	},
	// 绑定门店
	bind_shop(data) {
		return request({
			url: `/user/bind_shop`,
			method: "post",
			data
		})
	},
}